// 处理根据id删除文章
const db=require("../lib/db")

function deleteArti(id){
    return new Promise((resolve,reject)=>{
        let sql=`delete from main where id=${id}`
        db.querySql(sql).then(data=>{
            if(data.length==0){
                resolve(404)
            }else{
                console.log(true)
                resolve(true)
            }
        })
    })
}

module.exports=deleteArti;